package com.cn.test1.service;

import com.cn.test1.data.FootData;
import com.cn.test1.model.FootModel;

import java.util.ArrayList;
import java.util.List;

public class FootService {
    public List<FootModel> getFootModelList(){
        List<FootModel> list = new ArrayList<>();//创建数组集合用来存放数据层传来的数据
        FootData footData = new FootData();
        for(int i = 0; i < footData.consulting.length; i++){//遍历数组
            FootModel footModel = new FootModel();
            footModel.setConsulting(footData.consulting[i]);
            list.add(footModel);
        }
        return list;
    }
    public  List<FootModel> getFootModelMessage() { //留言提示信息
        List<FootModel> list = new ArrayList<>();
        FootData footData = new FootData();
        for(int i = 0; i < footData.message.length; i++) {
            FootModel footModel = new FootModel();
            footModel.setMessage(footData.message[i]);
            list.add(footModel);
        }
        return list;
    }

    public  List<FootModel> getFootModelListInput(){ //输入框数组信息
        List<FootModel> list = new ArrayList<>();
        FootData footData = new FootData();
        for(int i = 0; i < footData.inputmessage.length; i++) {
            FootModel footModel = new FootModel();
            footModel.setInputmessage(footData.inputmessage[i]);
            list.add(footModel);
        }
        return list;
        }


    public  List<FootModel> getFootModelListImg() { //网站底部图片
        List<FootModel> list = new ArrayList<>();
        FootData footData = new FootData();
        for(int i = 0; i < footData.img.length; i++) {
            FootModel footModel = new FootModel();
            footModel.setImg(footData.img[i]);
            list.add(footModel);
        }
        return  list;
    }

    public FootModel getFootModel(){
        FootData footData = new FootData();
        FootModel footModel = new FootModel();
        footModel.setButton(footData.getButton());
        footModel.setRecordnumber(footData.getRecordnumber());
        footModel.setRecordmessage(footData.getRecordmessage());
        footModel.setQrcode1(footData.getQrcode1());
        footModel.setQrcode2(footData.getQrcode2());
        footModel.setQrcode3(footData.getQrcode3());
        footModel.setQrcode4(footData.getQrcode4());

        return footModel;

    }

}
